<?php

class ZFPainel_Grid_Template_Table extends Bvb_Grid_Template_Table
{

    public function globalStart()
    {
        return '<table id="{GRID_ID}" class="table table-striped table-hover">';
    }

    public function globalEnd()
    {
        return '</table>';
    }

    public function noResults($message)
    {
        return '<tfoot><tr><td colspan="' . $this->options['colspan'] . '"  ' . $this->getClass('noRecords') . '>' . $message . '</td></tr></tfoot>' . PHP_EOL;
    }

    public function titlesStart()
    {
        return "<thead><tr>\n";
    }

    public function titlesEnd()
    {
        return "</tr></thead>\n";
    }

    public function titlesLoop($title, $colspan)
    {
        return '  ' . parent::titlesLoop($title, $colspan) . "\n";
    }

    public function loopStart($class, $style)
    {
        return parent::loopStart($class, $style) . "\n";
    }

    public function loopLoop($value, $class, $style, $rowspan, $colspan)
    {
        return '  ' . parent::loopLoop($value, $class, $style, $rowspan, $colspan) . "\n";
    }

    public function pagination($pagination, $numberRecords, $perPage, $pageSelect)
    {
        return '<tfoot><tr><td colspan="' . $this->options['colspan'] . '">' . $pagination . '</td></tr></tfoot>';
    }

}
